package MyNode;

import MyNetwork.NetCustomerDefine;
import MyNode.FSnode;
import repast.simphony.context.Context;
import repast.simphony.engine.environment.RunEnvironment;
import repast.simphony.engine.schedule.ScheduledMethod;
import repast.simphony.space.continuous.ContinuousSpace;
import repast.simphony.space.grid.Grid;
import repast.simphony.util.ContextUtils;
import repast.simphony.util.collections.IndexedIterable;

public class FifthSnode extends FSnode {
	private int name1;

	public FifthSnode(ContinuousSpace<Object> space, int Lnum, Grid<Object> grid, double value, boolean cMark,
			int name1) {
	
		this.name1 = name1;
		this.setLnum(0);
	}

	@ScheduledMethod(start = 1, interval = 1, priority = 5)
	public void setNet() {
		Context<Object> context = ContextUtils.getContext(this);
		IndexedIterable<Object> nodes = context.getObjects(FifthSnode.class);
		double tick = RunEnvironment.getInstance().getCurrentSchedule().getTickCount();
		String path = "D:\\eclipse\\CMfgGit\\CMfg\\Cmfg\\NetworkData\\dataBANet";
		NetCustomerDefine.netbuild(this, nodes.size(), tick, path);
	}

	public int getName1() {
		return name1;
	}

	public void setName1(int name1) {
		this.name1 = name1;
	}

}
